﻿
using System;
using System.Windows.Forms;


namespace FileMonitor
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            try
            {
                ProcessManager.StartProcesses();
                FileMonitor.Service.ProcessMonitor.Manager.ServiceOperationManager.Instance.StartService();
                this.btnStart.Visible = false;
                this.btnStop.Visible = true;
            }
            catch (Exception ex)
            {
                this.textBox1.Text = ex.Message;
            }

        }

        private void btnStop_Click(object sender, EventArgs e)
        {
            ProcessManager.StopProcesses();
            FileMonitor.Service.ProcessMonitor.Manager.ServiceOperationManager.Instance.StopService();
            this.btnStart.Visible = true;
            this.btnStop.Visible = false;
        }



    }
}
